This is an XFCN that will take a string of 7 chars or 10 chars and format it into a phone number format e.g., (###)-###-### or ###-###.
This is free. All I ask is to be notified of any suggestions or bugs found, and a credit line if you use it in released stacks. C source available on request.
Copyright 1988. All rights reserved.
Dwight Mayo
GEnie, MacNet - DMAYO
Compuserve - 76257,3303
-- part contents for background part 27
----- text -----
XFCN
-- part contents for background part 7
----- text -----
Syntax:
formatPhoneNum(Value)
Value can be any string of 7 or 10 chars. formatPhoneNum will strip any char that is not between 0 and 9 and return a formatted number such as: (###)-###-### or ###-###.
NOTE: if the string is not 7 or 10 chars long then formatPhoneNum will just return the string.